<local:DocumentBase x:Class="WPFExcelReport.YCAFB02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    
                    FontSize="16"
                    Loaded="Window_Loaded"
                    Background="White"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" /> 
        <db:SETINTEXDB  x:Key="SetEnv" />
        <CollectionViewSource   x:Key="vwMaster" Source="{Binding Path=ICC_FB02,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwDetail" Source="{Binding Path=FBST,Source={StaticResource SetProd}}" /> 
    </local:DocumentBase.Resources>
    <Grid   >
        <TabControl>
            <TabItem Header="{Binding Source={Localization:Translate Word=库存列表}}" >
                <Grid   >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="600" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"></ColumnDefinition>
                        <ColumnDefinition Width="1000"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <WrapPanel>
                            <Button FontSize="18" Content="{Binding Source={Localization:Translate Word=刷新}}"  BorderBrush="Yellow" Margin="20,0,0,0" Click="Refresh_Click" Height="40" Width="40"/>
                            <Button FontSize="18" Content="{Binding Source={Localization:Translate Word=查询}}"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnQuery_Click" Height="40" Width="40">
                            </Button> 
                            <TextBlock Text="{Binding Source={Localization:Translate Word=款号}}" FontSize="18" VerticalAlignment="Center"></TextBlock>
                            <TextBox FontSize="18" Name="txtFART" VerticalAlignment="Center">2</TextBox>
                            <Button FontSize="18" Content="{Binding Source={Localization:Translate Word=筛选}}"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnFilter_Click" Height="40" Width="40"/>
                            <Button FontSize="18" Content="{Binding Source={Localization:Translate Word=清除}}"  BorderBrush="Yellow" Margin="20,0,0,0" Click="btnClear_Click" Height="40" Width="40"/>
                            <Button Content="{Binding Source={Localization:Translate Word=预览}}"  FontSize="18"   BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="btnPrintPreview_Click"/>
                        </WrapPanel>
                    </StackPanel>
                    <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
                        <DataGrid CanUserReorderColumns="True"  
                                  Name="dlgMaster"
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="False"  
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                                  MaxHeight="600"
                              Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=LSNAME1, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=供应商}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBYEAR, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=年份}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBMONTH, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=月份}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBDAY, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=日期}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FSARTGRP, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=大类}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FSMATART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=小类}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBLO, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=仓库}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBLB, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=区域}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBAUF, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=单号}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBBARCODE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=条码}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBART, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=款号}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FSABEZ, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=品名}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=颜色}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBGROE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=尺寸}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBME, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBSTDPRICE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=标准价格}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBEKPRICE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=采购单价}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBREKPRICE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=实际采购价}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBEKVALUE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=实际采购金额}}"  Width="Auto" />
                                <DataGridTextColumn Binding="{Binding Path=FBSTDVALUE, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=标准金额}}"  Width="Auto" />
                            </DataGrid.Columns>
                        </DataGrid  >
                    </StackPanel>
                </Grid   >
            </TabItem> 
       
        </TabControl>
    </Grid>
</local:DocumentBase>
